/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.worsik.vypocty.topeni.tepelneztraty.model;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author 231260
 */
public final class Objekt extends Obecny {
	
	private String nazev;
	private int teplota_venkovni;
	private int char_cislo_budovy;
	private boolean je_podsklepeny;
	private int pocet_podlazi_np;
	private int pocet_podlazi_pp;
	private double tepelna_ztrata;
	private VychoziHodnoty vychoziHodnoty;

	public Objekt() {
		setNazev("novyObjekt");
		setTeplota_venkovni(-15);
		setChar_cislo_budovy(8);
		setJe_podsklepeny(false);
		setPocet_podlazi_np(1);
		setPocet_podlazi_pp(0);
		setTepelna_ztrata(0);
	}

	public int getChar_cislo_budovy() {
		return char_cislo_budovy;
	}

	public void setChar_cislo_budovy(int char_cislo_budovy) {
		this.char_cislo_budovy = char_cislo_budovy;
	}

	public VychoziHodnoty getVychoziHodnoty() {
		return vychoziHodnoty;
	}

	public void setVychoziHodnoty(VychoziHodnoty vychoziHodnoty) {
		this.vychoziHodnoty = vychoziHodnoty;
	}

	public boolean isJe_podsklepeny() {
		return je_podsklepeny;
	}

	public void setJe_podsklepeny(boolean je_podsklepeny) {
		this.je_podsklepeny = je_podsklepeny;
	}

	public String getNazev() {
		return nazev;
	}

	public void setNazev(String nazev) {
		this.nazev = nazev;
	}

	public int getPocet_podlazi_np() {
		return pocet_podlazi_np;
	}

	public void setPocet_podlazi_np(int pocet_podlazi_np) {
		this.pocet_podlazi_np = pocet_podlazi_np;
	}

	public int getPocet_podlazi_pp() {
		return pocet_podlazi_pp;
	}

	public void setPocet_podlazi_pp(int pocet_podlazi_pp) {
		this.pocet_podlazi_pp = pocet_podlazi_pp;
	}

	public double getTepelna_ztrata() {
		return tepelna_ztrata;
	}

	public void setTepelna_ztrata(double tepelna_ztrata) {
		this.tepelna_ztrata = tepelna_ztrata;
	}

	public int getTeplota_venkovni() {
		return teplota_venkovni;
	}

	public void setTeplota_venkovni(int teplota_venkovni) {
		this.teplota_venkovni = teplota_venkovni;
	}
	
	public List<String> getPodlaziList()
	{
		List<String> list = new ArrayList<String>();
		if (isJe_podsklepeny())
		{
			for (int i = getPocet_podlazi_pp(); i>0; i--)
			{
				list.add(""+i+"PP");
			}
		}
		for (int i = 1; i<=getPocet_podlazi_np(); i++)
		{
			list.add(""+i+"NP");
		}
		
		return list;
	}
	
	public int getCisloPodlazi(int poradi)
	{
		return poradi-getPocet_podlazi_pp()+1;
	}
}
